package io.renren.modules.live.dao;

import io.renren.modules.live.entity.FanweAnchorEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.live.vo.AnchorVo;
import io.renren.modules.live.vo.UserAnchorUpdateInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 主播表
 * 
 * @author shaoqi
 * @email sunlightcs@gmail.com
 * @date 2020-11-17 09:18:22
 */
@Mapper
public interface FanweAnchorDao extends BaseMapper<FanweAnchorEntity> {

    FanweAnchorEntity queryByUserName(String nickNumber);


    List<Long> findByVoideListVideoNameAndAnchorName(String content);

    void addAnchorFile(Long anchorId, String fileUrl);

    void updateUserById(UserAnchorUpdateInfoVo userAnchorUpdateInfoVo);
    /**
     *管理员查看主播列表
     * @return
     */
    List<FanweAnchorEntity> selectAnchorList(AnchorVo anchorVo);
    /**
     *管理员查看主播列表
     * @return
     */
    Integer selectAnchorListCount(AnchorVo anchorVo);
    /**
     *新建主播账号
     * @return
     */
    Integer insertAnchor(FanweAnchorEntity fanweAnchorEntity);
    /**
     * 管理员查看主播信息
     * @param anchorId
     * @return
     */
    FanweAnchorEntity selectAnchorInformation(String anchorId);

    /**
     * 修改主播信息状态
     * @param anchorId
     * @param status
     * @return
     */
    Integer updateAnchorInStatus(String anchorId,String status);

    void updateAnchorMoney(@Param("anchorId") Long anchorId,@Param("propMoney") BigDecimal propMoney);
}
